#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
/*********Begin*********/
struct people {
    char name[20];
    int cout;
}leader[3] = { {"Li", 0},
    {"Zhang", 0},{ "Sun", 0} };

/*********End**********/
int main(void)
{
    /*********Begin*********/
    int n;
    scanf("%d", &n);
    char lname[20];
    for (int i = 0; i < n; i++) {
        scanf("%s", lname);
        for (int j = 0; j < 3; j++) {
            if (!strcmp(lname, leader[j].name)) {
                leader[j].cout++;
            }
        }
    }
    printf("Li:%d\nZhang:%d\nSun:%d\n", leader[0].cout, leader[1].cout, leader[2].cout);
    /*********End**********/
    return 0;
}